03f7002d15a65cc663d074945cd6a2a54340f3e7,src/main/java/com/github/bingoohuang/westcache/manager/RedisCacheManager.java,RedisWestCache,get,#WestCacheOption#String#Callable#,38
Before Change
String cacheKey,
Callable<WestCacheItem> callable) {
String jsonValue = Redis.jedis.get(prefix + cacheKey);
if (StringUtils.isEmpty(jsonValue))
return new WestCacheItem(null);
Object object = FastJsons.parse(jsonValue);
After Change
String cacheKey,
Callable<WestCacheItem> callable) {
String jsonValue = Redis.getRedis(option).get(prefix + cacheKey);
if (StringUtils.isNotEmpty(jsonValue)) {
Object object = FastJsons.parse(jsonValue);
return new WestCacheItem(object);
}
val item = callable.call();
put(option, cacheKey, item);
return item;
}
@Override